/**
 * utils/mappings.js
 * 提供 speaker/material/emotion 等ID映射函数
 */

const config = require('../config');

/**
 * 获取 Speaker ID 对应值
 */
function getSpeakerIdMapping(speaker) {
  return config.speakerIds[speaker] || config.speakerIds['默认'];
}

/**
 * 获取素材 ID 映射
 */
function getMaterialIdMapping(material) {
  return config.materialIds[material] || config.materialIds['默认'];
}

/**
 * 情感映射
 */
function getEmotionMapping(type) {
  return config.emotions[type] || config.emotions['默认'];
}

/*
* 积分映射
*/
function getTaskPointsMapping(type){
  return config.pointMap[type] || config.pointMap['默认'] ; // 默认为1消耗
}


module.exports = {
  getSpeakerIdMapping,
  getMaterialIdMapping,
  getEmotionMapping,
  getTaskPointsMapping
};
